﻿

import { NgModule } from '@angular/core';
import { RouterModule, NavigationEnd, Router } from '@angular/router';
import { DelegationComponent } from './delegation/delegation.component';
import { BacklogComponent } from './backlog/backlog.component';
import { PoccessComponent } from './poccess/poccess.component';

@NgModule({
    imports: [
        RouterModule.forChild([
            {
                path: '',
                children: [
                    { path: 'delegation', component: DelegationComponent },
                    { path: 'backlog', component: BacklogComponent },
                    { path: 'poccess', component: PoccessComponent }
                ]
            }
        ])
    ],
    exports: [
        RouterModule
    ]
})
export class WorkflowRoutingModule {
    constructor(private router: Router) {
        router.events.subscribe(event => {
            if (event instanceof NavigationEnd) {
                window.scroll(0, 0);
            }
        });
    }

}
